<?php
/**
 * @description:
 * @author     : Geomen
 * @time       : 2018/10/19 14:26
 */


namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class Image extends Model
{
    protected $fillable = ['url','open_id'];

    //关联用户
    public function user(){
        return $this->belongsTo(User::class,'open_id','open_id');
    }

    //关联用户喜欢
    public function imgLike(){
        return $this->hasMany(ImgLike::class,'img_id');
    }
}